﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace LuoYi.Admin.Entities;

/// <summary>
/// 代码生成业务表字段
/// </summary>
[Table("gen_table_column")]
public class GenTableColumn : IEntity
{
    /// <summary>
    /// 编号
    /// </summary>
    [Key]
    [Column("column_id", TypeName = "bigint(20)")]
    public long ColumnId { get; set; }

    /// <summary>
    /// 归属表编号
    /// </summary>
    [Column("table_id", TypeName = "bigint(20)")]
    public long? TableId { get; set; }

    /// <summary>
    /// 列名称
    /// </summary>
    [Column("column_name")]
    [StringLength(200)]
    public string? ColumnName { get; set; }

    /// <summary>
    /// 列描述
    /// </summary>
    [Column("column_comment")]
    [StringLength(500)]
    public string? ColumnComment { get; set; }

    /// <summary>
    /// 列类型
    /// </summary>
    [Column("column_type")]
    [StringLength(100)]
    public string? ColumnType { get; set; }

    /// <summary>
    /// JAVA类型
    /// </summary>
    [Column("java_type")]
    [StringLength(500)]
    public string? JavaType { get; set; }

    /// <summary>
    /// JAVA字段名
    /// </summary>
    [Column("java_field")]
    [StringLength(200)]
    public string? JavaField { get; set; }

    /// <summary>
    /// 是否主键（1是）
    /// </summary>
    [Column("is_pk")]
    [StringLength(1)]
    public string? IsPk { get; set; }

    /// <summary>
    /// 是否自增（1是）
    /// </summary>
    [Column("is_increment")]
    [StringLength(1)]
    public string? IsIncrement { get; set; }

    /// <summary>
    /// 是否必填（1是）
    /// </summary>
    [Column("is_required")]
    [StringLength(1)]
    public string? IsRequired { get; set; }

    /// <summary>
    /// 是否为插入字段（1是）
    /// </summary>
    [Column("is_insert")]
    [StringLength(1)]
    public string? IsInsert { get; set; }

    /// <summary>
    /// 是否编辑字段（1是）
    /// </summary>
    [Column("is_edit")]
    [StringLength(1)]
    public string? IsEdit { get; set; }

    /// <summary>
    /// 是否列表字段（1是）
    /// </summary>
    [Column("is_list")]
    [StringLength(1)]
    public string? IsList { get; set; }

    /// <summary>
    /// 是否查询字段（1是）
    /// </summary>
    [Column("is_query")]
    [StringLength(1)]
    public string? IsQuery { get; set; }

    /// <summary>
    /// 查询方式（等于、不等于、大于、小于、范围）
    /// </summary>
    [Column("query_type")]
    [StringLength(200)]
    public string? QueryType { get; set; }

    /// <summary>
    /// 显示类型（文本框、文本域、下拉框、复选框、单选框、日期控件）
    /// </summary>
    [Column("html_type")]
    [StringLength(200)]
    public string? HtmlType { get; set; }

    /// <summary>
    /// 字典类型
    /// </summary>
    [Column("dict_type")]
    [StringLength(200)]
    public string? DictType { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    [Column("sort", TypeName = "int(11)")]
    public int? Sort { get; set; }

    /// <summary>
    /// 创建者
    /// </summary>
    [Column("create_by")]
    [StringLength(64)]
    public string? CreateBy { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Column("create_time", TypeName = "datetime")]
    public DateTime? CreateTime { get; set; }

    /// <summary>
    /// 更新者
    /// </summary>
    [Column("update_by")]
    [StringLength(64)]
    public string? UpdateBy { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    [Column("update_time", TypeName = "datetime")]
    public DateTime? UpdateTime { get; set; }
}
